<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>动态</title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/pullToRefresh.css" />
		<link rel="stylesheet" type="text/css" href="../fonts/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/global.css" />
		<style type="text/css">
			.mui-bar .mui-title {font-weight: bold;}			
			.goods_pic {max-height: 74px !important;background: red;}			
			.note {margin: 10px 0;}
			.paddingl_r_15px_tb6px{padding: 6px 15px;}
			.mui-media-object img{max-width: 105px;min-width: 105px;max-height: 74px;min-height: 74px;}
		</style>
	</head>
	<body ng-app="dynamicApp" ng-controller="dynamicController">
		<header class="mui-bar mui-bar-nav bg_white">
			<h1 class="mui-title colorP sp_fonts">动态</h1>
		</header>
		<div class="mui-content"> 
			<div></div>
			<div ng-repeat="(index,dynamic) in res">	
				<ul class="mui-table-view  bg_white margin-bottom5px" ng-repeat="(index,d) in dynamic">
					<li class="mui-table-view-cell mui-media" ng-if="d.status==1" ng-click="dynamicData(d.uid,d.status,d.from_id)">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-right goods_pic" src="{{d.goods.good_image}}">
							<div class="mui-media-body">
								<div style="margin-bottom: 2px !important;">
									<div class="user_pic"><img ng-src="{{d.goods.icon}}" /></div>
									<span class="padding_l line-height30px color333 font14">{{d.goods.nick}} </span>
								</div> 
								<div class="mui-ellipsis" style="margin-bottom: 2px !important;font-size: 12px;">{{d.goods.good_name}}</div>
								<div class="mui-clearfix">
									<span class="mui-pull-left colorP font12">工期：<i>{{d.goods.maf_time}}</i>天</span>
									<span class="mui-pull-right colorRed line-height30px">￥{{d.goods.price}}</span>
								</div>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media" ng-if="d.status==0" ng-click="dynamicData(d.uid,d.status,d.from_id)">
						<a href="javascript:;" class="white-space">						
							<div class="mui-media-object mui-pull-right margin_tb_8px">
								<img ng-if="d.notes[0].file_type == 0" ng-src="{{d.notes[0].subject}}">
								<img ng-if="d.notes[0].file_type == 1" src="../img/video.png" style="background: #000;"/>
							</div>
							<ul class="mui-media-body mui-pull-left user_view" style="width: 50%;">
								<li class="mui-ellipsis">
									<div class="user_pic"><img ng-src="{{d.notes[0].icon}}" /></div>
									<span class="mui-ellipsis">{{d.notes[0].nick}}</span>
								</li>
								<li>
									<i class="iconfont mui-icon icon-color" ng-if="d.notes[0].file_type == 0">&#xe615;</i>
									<i class="iconfont mui-icon icon-color" ng-if="d.notes[0].file_type == 1">&#xe8b3;</i>
									<span class="padding_l line-height30px">{{d.notes[0].title}}</span>
								</li>
								<li>
									<i class="iconfont mui-icon icon-color">&#xe60a;</i>
									<span class="padding_l line-height30px">{{d.notes[0].tags}}</span>
								</li>
							</ul>
						</a>
					</li>
					<div class="mui-clearfix bg_white border-bottom" style="height: 32px;padding: 0 15px;">
						<!--<div class="user_pic"><img ng-src="{{d.icon}}"/></div>-->
						<!--<span class="padding_l line-height30px mui-ellipsis" style="width: 42%;display: inline-block;">{{d.nick}}{{d.comment}}</span>-->
						<p class="mui-pull-right line-height30px font12">{{d.push_time}}</p>
					</div>
				</ul>
				<p class="mui-text-center font14 line-height44px" id="not_more" ng-if="not_more == 1">没有更多数据了~~~</p>
				<div class="mui-text-center line-height44px color999 font14 padding_tb20" ng-if="res[0].length == undefind"><i class="iconfont mui-icon font60">&#xe6e3;</i><br />没有更多数据了~~~</div>
			</div>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/open.js"></script>
	<script src="../js/mui.pullToRefresh.js"></script>
	<script src="../js/mui.pullToRefresh.material.js"></script>
	<script src="../js/angular.min.js"></script>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/apppublic.js"></script>
	<script src="../js/app/dynamic_state.js"></script>
	<script src="../js/release_type.js"></script>
	<script type="text/javascript">
		(function($) {
			//阻尼系数
			var deceleration = mui.os.ios ? 0.003 : 0.0009;
			$('.mui-scroll-wrapper').scroll({
				bounce: false,
				indicators: false, //是否显示滚动条
				deceleration: deceleration
			});
			$.ready(function() {
				//循环初始化所有下拉刷新，上拉加载。
				$.each(document.querySelectorAll('.mui-content'), function(index, pullRefreshEl) {
					$(pullRefreshEl).pullToRefresh({
						down:{
							callback: function() {
								var self = this;
								setTimeout(function() {
									loadNews();
									self.endPullDownToRefresh();
								}, 1000);
							}
						},
						up: {
							callback: function() {
								var self = this;
								getValue();
								setTimeout(function() {
									self.endPullUpToRefresh();
								}, 1000);
							}
						}
					});
				});
			});
		})(mui);
		function loadNews() {
			appElement = document.querySelector('[ng-controller=dynamicController]');
			$scope = angular.element(appElement).scope();
			self_id = plus.storage.getItem('uid');
			resArry = [];
			cur_page = 1;
			nomore = false;
			$scope.initView();
			$scope.$apply();
		}
		function getValue() {
			appElement = document.querySelector('[ng-controller=dynamicController]');
			$scope = angular.element(appElement).scope();
			self_id = plus.storage.getItem('uid');
			cur_page++;
			$scope.initView();
			$scope.$apply();
		}
	</script>
</html>